home *** CD-ROM | disk | FTP | other *** search
/ Dynamic HTML Construction Kit / Dynamic HTML Construction Kit.iso / source_code / dhtmlunl / dhtml.exe / CD Content / Chap15 / dun15_9.txt < prev    next >
Encoding:
Text File  |  1997-12-18  |  1014 b   |  35 lines

  1. <P ALIGN=center>
  2.  
  3.   <A HREF="" onClick="changeContent(); return false;">
  4.  
  5.     Click Here To Change Content
  6.  
  7.   </A>
  8.  
  9. </P>
  10.  
  11.  
  12.  
  13. <P><FONT ID=first FACE="Arial, Helvetica" SIZE=+2">
  14.  
  15.   Generic Content That Will Be Replaced
  16.  
  17. </FONT></P>
  18.  
  19.  
  20.  
  21. <P><FONT ID=second FACE="Arial, Helvetica" SIZE=+2">
  22.  
  23.   Generic Content That Will Be Replaced
  24.  
  25. </FONT></P>
  26.  
  27.  
  28.  
  29. <P><FONT ID=third FACE="Arial, Helvetica" SIZE=+2">
  30.  
  31.   Generic Content That Will Be Replaced
  32.  
  33. </FONT></P>
  34.  
  35.  
  36.  
  37. <P><FONT ID=fourth FACE="Arial, Helvetica" SIZE=+2">
  38.  
  39.   Generic Content That Will Be Replaced
  40.  
  41. </FONT></P>
  42.  
  43.  
  44.  
  45. <SCRIPT>
  46.  
  47. function changeContent()
  48.  
  49. {
  50.  
  51.   beginText = "<B>Content Replaced By The <TT>";
  52.  
  53.   endText = "</TT> Property</B>";
  54.  
  55.  
  56.  
  57.   document.all.first.innerHTML = beginText + "innerHTML" + endText;
  58.  
  59.   document.all.second.innerText = beginText + "innerText" + endText;
  60.  
  61.   document.all.third.outerHTML = beginText + "outerHTML" + endText;
  62.  
  63.   document.all.fourth.outerText = beginText + "outerText" + endText;
  64.  
  65. }
  66.  
  67. </SCRIPT>
  68.  
  69.